<!DOCTYPE html>
<html lang="zh_CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./node_modules/vue/dist/vue.js"></script>
</head>

<body>
<div id="app">
<!--    <PhotoItem ></PhotoItem>-->
</div>
<script>
    Vue.component("PhotoItem",{
        props: {
            imgUrl:String,
            imgName:String,
        },
        template:`
            <div>
                <div><img :src="imgUrl"/></div>
                <div>{{imgName}}</div>
            </div>
        `,
    })
    new Vue({
        el: "#app",
        data: {
        },
        template:`
          <div>
          <PhotoItem img-name="呵呵" img-url="https://file.sjto.com/wx_xcx/1.png"></PhotoItem>
          </div>
        `,
    });
</script>
</body>

</html>